import React, { useContext } from 'react';

import cls from 'classnames';

import { IDictionaryTypeLayout } from '@/pages/SystemController/DictionaryTreeController/type';

import { DictionaryContext } from '@/pages/SystemController/DictionaryTreeController/hooks';

export const DictionaryTypeLayout: React.FC<IDictionaryTypeLayout> = ({
  children,
  clsName,
}) => {
  const { prefixCls } = useContext(DictionaryContext);
  return <div className={cls(prefixCls + clsName)}>{children ?? '--'}</div>;
};
